# 封装、继承、多态
# 不同的子类调用相同的父类 产生不同的结果

class dog():
     def __init__(self, name):
         self.name = name

     def game(self):
         print("普通的狗")

class good(dog):
    def game(self):
        print("神狗要去天上玩")

class person():
    def __init__(self, name):
        self.name = name

    def game_with_dog(self, which_dog):
        print(f'{self.name}和{which_dog.name}一起玩')
        which_dog.game()

wc = dog(name="旺财")
xtq = dog(name='哮天犬')
xm = person("小明")
xm.game_with_dog(which_dog=xtq)
